/**
 * 
 */
package sqs.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @author kjleng
 *
 */
public class MultipleAnsMCQQuestionAnswer extends Answer {
	private List<MultipleAnsMCQOptionAnswer> mcqOptionAnswers;
	
	public MultipleAnsMCQQuestionAnswer(){
		mcqOptionAnswers = new ArrayList<MultipleAnsMCQOptionAnswer>();
	}
	
	public void setNumericValue(int val){}
	public int getNumericValue(){
		return 0;
	}
	
	public List<Option> getOptions(){
		System.out.println("!!!!!!!mcqOptionAnswers = " +mcqOptionAnswers.size());
		
		List<Option> options = new ArrayList<Option>();
		Iterator<MultipleAnsMCQOptionAnswer> i = mcqOptionAnswers.iterator();
		while(i.hasNext()){
			MultipleAnsMCQOptionAnswer optionAns = i.next();
			Option option = optionAns.getOption();
			options.add(option);
		}	
		System.out.println("!!!!!!!options in MultipleAnsMCQ = " +options.size());
		
		return options;
	}
	
	public void addOption(Option option){
		MultipleAnsMCQOptionAnswer optionAns = new MultipleAnsMCQOptionAnswer();
		optionAns.setOption(option);
		mcqOptionAnswers.add(optionAns);
	}

	public List<MultipleAnsMCQOptionAnswer> getMcqOptionAnswers() {
		return mcqOptionAnswers;
	}

	public void setMcqOptionAnswers(
			List<MultipleAnsMCQOptionAnswer> mcqOptionAnswers) {
		this.mcqOptionAnswers = mcqOptionAnswers;
	}

	
	
	
}
